<script setup>
import {ElContainer, ElHeader, ElMessageBox} from 'element-plus';
import router from "../router";
//退出登录
const Logout=async ()=>{
  const confirm= await ElMessageBox.confirm('确认退出吗？', '提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    type: 'warning',
    draggable: true
  }).then(async ()=>{
    sessionStorage.removeItem('manager');
    router.push('/')
  }).catch(error=>{
    console.log(error);
  })
}
</script>
<template>
  <div class="Head" style="text-align: center;">
    <el-container class="background" style="height: 150px" ></el-container>
    <el-container style="height: 10vh">
      <el-header style="font-size: 50px;color: purple;letter-spacing: 40px">
        校爱同学管理平台
        <el-button type="danger" style="float: right" @click="Logout" >
          退出登录
        </el-button>
      </el-header>
    </el-container>
  </div>
</template>

<style>

</style>
